#define _CRT_SECURE_NO_WARNINGS 1
#include"Heap.h"

void AdjustUp(HeapType* a, int child){

	int parent = (child - 1) / 2;
	while (child > 0) {
		if (a[child] < a[parent])
		{
			Swap(&a[child], &a[parent]);
			child = parent;
			parent = (child - 1) / 2;

		}

		else
		{
			break;
		}

	}





}
void Swap(HeapType* x, HeapType* y) {

	HeapType* tem = *x;
	*x = *y;
	*y = tem;

}
